<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" type="text/css" href="__CSS__/base.css">
    <link rel="stylesheet" type="text/css" href="__CSS__/tx.css">
    <link rel="stylesheet" type="text/css" href="__CSS__/popups.css">
    <script src="__JS__/jquery-3.1.1.min.js"></script>
    <script type="text/javascript" src="__JS__/reset.js"></script>
    <script type="text/javascript" src="__JS__/popups.js"></script>
    <title>提现</title>
</head>
<body>
    <div class="wrap">
      <div class="header">
        <img class="userhead" src="{$userInfo.head_img_url}" alt="">
        <p class="username">{$userInfo.nickname}</p>
        <p class="title">总资产 (元) </p>
        <p class="money">{php}echo ($userInfo['amount']+$userInfo['fall_into_amount'])/100{/php}</p>
      </div>
      <!-- 内容 -->
      <div class="main">
        <div class="content">
          <p class="msg">提现金额</p>
          <div class="money_wrap">
            <span class="icon">￥</span>
            <div class="input_wrap">
              <input id="putMoney" type="text" placeholder="请输入提现金额"> 
            </div>
          </div>
          <p class="sm">说明：提现必须大于10元，必须是10的倍数</p>
          <div class="txBtn">提现</div>
        </div>

        <!-- 提现详情列表 -->
        <dl class="detail">
          <dt class="top_title">
            <p>提现时间</p>
            <p>金额</p>
          </dt>
            {volist name="payArr" id="payArr"}
          <dd class="dd_con">
            <p>{$payArr.pay_time|date="Y-m-d H:i:s",###}</p>
            <p>{$payArr.amount/100}</p>
          </dd>
            {/volist}
        </dl>
      </div>
      <!-- 底部 -->
      <div class="footer">
        <ul class="footer_list">
          <li class="footer_item" id="toHome">
            <i class="iconfont icon ">&#xe65d;</i>
            <p class="title">海报大厅</p>
          </li>
          <li class="footer_item">
            <i class="iconfont icon active">&#xe608;</i>
            <p class="title active">提现</p>
          </li>
          <li class="footer_item" id="toMy">
            <i class="iconfont icon ">&#xe601;</i>
            <p class="title ">我的</p>
          </li>
        </ul>
      </div>
    </div>

    <script>
      $(function(){
        
        $('.txBtn').click(function(){
          let money = parseInt($('#putMoney').val());
          if(money < 10 || money%10 !== 0){
            jqalert({
                title: '提示',
                content: '提现必须大于10元，必须是10的倍数'
            })
            return
          }else{
              $.post("",{payAmount:money},function(data){
                  str=JSON.parse(data);
                  alert(str.msg);
                  if(str.code==200){
                      location.reload();
                  }
              })
          }
        })
      })
     
    </script>
</body>
</html>